<HTML><HEAD><TITLE>cs_violations(+CS, -Vio)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(tentative)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>cs_violations(+CS, -Vio)</H1>
Get a tentative variable reflecting the violatedness of the constraint set
<DL>
<DT><EM>CS</EM></DT>
<DD>Constraint set
</DD>
<DT><EM>Vio</EM></DT>
<DD>A tentative variable (output)
</DD>
</DL>
<H2>Description</H2>

	<P>
	Returns a tentative variable reflecting the (current and future)
	violatedness of the constraint set.
	</P>
    
<H3>Modes and Determinism</H3><UL>
<LI>cs_violations(+, -) is det
</UL>
<H2>Examples</H2>
<PRE>
    ?- length(Xs, 5), tent_set_all(Xs, 99), CS :~ alldifferent(Xs),
       cs_violations(CS, V).
    Xs = [Xi{99 -&gt; 4}, Xi{99 -&gt; 4}, Xi{99 -&gt; 4}, Xi{99 -&gt; 4}, Xi{99 -&gt; 4}]
    CS = constraint_set(V{10 -&gt; 0}, ...)
    V = V{10 -&gt; 0}
    There is 1 delayed goal.
    Yes (0.00s cpu)
    </PRE>
<H2>See Also</H2>
<A HREF="../../lib/tentative/cs_current_violations-2.html">cs_current_violations / 2</A>
</BODY></HTML>
